package com.android.lovingpet.util;

import android.content.Context;

import com.codbking.widget.DatePickDialog;
import com.codbking.widget.OnSureLisener;
import com.codbking.widget.bean.DateType;

/**
 * Created by ikata on 2018/6/16.
 */

public class MyDatePickDialog {
    public static class Builder{
        private DatePickDialog dialog;
        public Builder(Context context)
        {
            dialog=new DatePickDialog(context);
        }
        public Builder setYearLimit(int number)
        {
            dialog.setYearLimt(number);
            return this;
        }
        public Builder setTitle(String title)
        {
            dialog.setTitle(title);
            return this;
        }
        public Builder setType(DateType type)
        {
            dialog.setType(type);
            return this;
        }
        public Builder setMessageFormat(String format)
        {
            dialog.setMessageFormat(format);
            return this;
        }
        public Builder setOnSureLisener(OnSureLisener onSureLisener)
        {
            dialog.setOnSureLisener(onSureLisener);
            return this;
        }
        public DatePickDialog build()
        {
            return dialog;
        }
    }
}
